#import "DDPersonCell.h"
CGFloat const JTWPERSONCELLHEIGHT = 60;
@interface DDPersonCell()
@property (nonatomic, strong) CCLabel *titleLBL;
@property (nonatomic, strong) CCLabel *contentLBL;
@property (nonatomic, strong) UIView *line;
@end
@implementation DDPersonCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
//        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.line.hidden = NO;
        self.backgroundColor = [UIColor whiteColor];
    }
    return self;
}
- (CCLabel *)titleLBL
{
    if (!_titleLBL)
    {
        _titleLBL = [[CCLabel alloc] init];
        _titleLBL.font = FONT(UIFontWeightRegular, 15);
        _titleLBL.textColor = TEXT_GRAY_COLOR;
        [self addSubview:_titleLBL];
        _titleLBL.c_left.c_equal(self).with.coffset(GAP);
        _titleLBL.c_centerY.c_equal(self);
    }
    return _titleLBL;
}
- (CCLabel *)contentLBL
{
    if (!_contentLBL)
    {
        _contentLBL = [[CCLabel alloc] init];
        _contentLBL.font = FONT(UIFontWeightRegular, 15);
        _contentLBL.textColor = TEXT_GRAY_COLOR;
        [self addSubview:_contentLBL];
        _contentLBL.c_right.c_equal(self).with.coffset(-GAP);
        _contentLBL.c_centerY.c_equal(self);
    }
    return _contentLBL;
}
- (UIView *)line
{
    if (!_line)
    {
        _line = [[UIView alloc] init];
        _line.backgroundColor = CELL_LINE_COLOR;
        [self addSubview:_line];
        _line.c_left.c_equal(self).with.coffset(GAP);
        _line.c_right.c_equal(self).with.coffset(-GAP);
        _line.c_bottom.c_equal(self);
        _line.c_height.c_equal(1.0);
    }
    return _line;
}
- (void)setTitle:(NSString *)title
{
    if (_title != title)
    {
        _title = title;
        self.titleLBL.text = _title;
    }
}
- (void)setContent:(NSString *)content
{
    if (_content != content)
    {
        _content = content;
        self.contentLBL.text = _content;
    }
}
- (void)setContentAttr:(NSAttributedString *)contentAttr
{
    if (_contentAttr != contentAttr)
    {
        _contentAttr = contentAttr;
        self.contentLBL.attributedText = _contentAttr;
    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    [super touchesBegan:touches withEvent:event];
}
- (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    [super touchesEnded:touches withEvent:event];
}

@end
